import serverPath from "@/common/path"
import {
	mapState
} from 'vuex'
import {
	requestUrl,
} from '@/common/config.js'
export const mixin = {
	data() {
		return {
			serverPath: serverPath,
			urlParams: '',
			imgDomain: requestUrl
		};
	},
	watch: {},
	computed: {},
	methods: {
		to(url) {
			uni.navigateTo({
				url:url
			});
		},
		nvaTo(url) {
			uni.navigateTo({
				url:url
			});
		},
		navigateTo(params) {
			uni.navigateTo(params);
		},
		pageBack(num = 1, wait) {
			if (wait) {
				setTimeout(() => {
					uni.navigateBack({
						delta: num
					});
				}, wait)
				return
			}
			uni.navigateBack({
				delta: num
			});
		},
	},
	onLoad(urlParams) {
		this.urlParams = urlParams
	},
}
